import java.util.Scanner;
public class test555 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] scores = new int[6];
        for (int i = 0; i < scores.length; i++) {
            System.out.println("请输入学生的成绩");
            scores[i] = sc.nextInt();
        }
        int sum = 0;
        for (int i = 0; i < scores.length; i++) {
            sum += scores[i];
        }

        int max=scores[0];
        for (int i = 0; i < scores.length; i++) {
            if (scores[i] > max) {
                max = scores[i];
            }
        }
        System.out.println("最高分是："+max);

        int min=scores[0];
        for (int i = 0; i <scores.length; i++) {
            if (scores[i] < min) {
                min = scores[i];
            }
        }
        System.out.println("最低分是："+min);
        int avg = (sum-max-min) / (scores.length-2);
        System.out.println("平均分是" + avg);
    }
}
